//
//  HMRecommendCellModel.m
//  HowToDo
//
//  Created by Stan on 2017-01-04.
//  Copyright © 2017 KY. All rights reserved.
//

#import "HMRecommendCellModel.h"
#import <YYModel.h>
#import "HMNetWorkTool.h"
#import "HMHomeRecommendListModel.h"


@implementation HMRecommendCellModel

+ (void)loadDetailDataWithDetailID:(NSInteger)detailID andFinished:(void(^)(id responseObject))completedBlock Failed:(void(^)(NSError* error))failedBlock{
    
    [[HMNetWorkTool sharedTool]requestRecommendDetailDataWithDetailID:detailID andFinished:^(id responseObject) {
        if ([responseObject isKindOfClass:[NSDictionary class]]) {
            //            字典转模型
            HMRecommendCellModel *cellModel = [HMRecommendCellModel yy_modelWithDictionary:responseObject[@"data"]];
            
            
            
            completedBlock(cellModel);
        }
        
    } Failed:^(NSError *error) {
        HMLog(@"error = %@",error);
        
        
    }];
    
}


@end
